import { request } from '.././network/request'
let token = localStorage.getItem('token')
// console.log(token);

export function fetchLoginInfo(config) {
  return request({
    url: '/admin/login',
    method: 'POST',
    data: config.data,
  })
}
export function fetchAsiders() {
  return request({
    url: '/menu/treeList',
    headers: {
      'Authorization': token
    }
  })
}
export function fetchProductsLists() {
  return request({
    url: '/product/list',
    headers: {
      'Authorization': token
    }
  })
}

// this.$router.push('/layout').catch(() => {})